﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace WadViewer.Configuration
{
	public class AzureConnectionConfigElement : ConfigurationElement
	{
		[ConfigurationProperty("name",
						DefaultValue = "myConnection",
						IsRequired = true,
						IsKey = true)]
		public string Name
		{
			get
			{
				return (string)this["name"];
			}
			set
			{
				this["name"] = value;
			}
		}

		[ConfigurationProperty("tableUrl",
						DefaultValue = "https://mystorage.table.core.windows.net",
						IsRequired = true,
						IsKey = false)]
		public string TableUrl
		{
			get
			{
				return (string)this["tableUrl"];
			}
			set
			{
				this["tableUrl"] = value;
			}
		}

		[ConfigurationProperty("accountName",
						DefaultValue = "",
						IsRequired = true,
						IsKey = false)]
		public string AccountName
		{
			get
			{
				return (string)this["accountName"];
			}
			set
			{
				this["accountName"] = value;
			}
		}

		[ConfigurationProperty("key",
						DefaultValue = "https://mystorage.table.core.windows.net",
						IsRequired = true,
						IsKey = false)]
		public string Key
		{
			get
			{
				return (string)this["key"];
			}
			set
			{
				this["key"] = value;
			}
		}
	}
}
